package com.threeox.commonlibrary.ui.activity;

import android.os.Build;
import android.os.Bundle;
import android.webkit.WebView;
import android.widget.LinearLayout;

import com.threeox.commonlibrary.entity.engine.model.layout.ModelMessage;
import com.threeox.commonlibrary.ui.activity.base.BaseModelActivity;
import com.threeox.commonlibrary.ui.view.engineview.model.ModelBaseView;

/**
 *
 * @ClassName: ModelActivity
 *
 * @Description: TODO()
 *
 * @author 赵屈犇
 *
 * @date 创建时间: 2017/7/5 13:42
 *
 * @version 1.0
 *
 */
public class ModelActivity extends BaseModelActivity {

    protected ModelMessage mModelMessage;
    protected ModelBaseView mModelBaseView;

    @Override
    protected void setView(Bundle stateBundle) {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
            WebView.enableSlowWholeDocumentDraw();
        }
        mModelBaseView = new ModelBaseView(mContext);
        initFullScreenState(mModelBaseView);
        mModelBaseView.initData(getIntent());
        mModelMessage = mModelBaseView.getModelMessage();
        addContentView(mModelBaseView, new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,LinearLayout.LayoutParams.MATCH_PARENT));
    }

    @Override
    protected void initView() {
        initBaseModelMessage(mModelMessage, mModelBaseView);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected void setListener() {

    }
}
